import { post } from '@/utils/request'

// 查询客服账号页列表 /service-cop/b/friends/v1/pageList
export const getKfAccountList = p => post(`/service-cop/b/kfAccount/v1/list`, p)
// 查询客服账号详情
export const viewKfAccount = p => post(`/service-cop/b/kfAccount/v1/view/${p.id}`, p, 'get')
// 添加客服账号
export const addKfAccount = p => post(`/service-cop/b/kfAccount/v1/add`, p)
// 修改客服账号
export const modifyKfAccount = p => post(`/service-cop/b/kfAccount/v1/modify`, p)
// 删除客服账号
export const delKfAccount = p => post(`/service-cop/b/kfAccount/v1/del/${p.id}`, p, 'get')
// 删除客服账号
export const changeKfAccountStatus = p => post(`/service-cop/b/kfAccount/v1/changeStatus/${p.id}/${p.status}`, p, 'get')
// 从企业微信同步群列表
export const syncKfAccountListFromWx = p => post(`/service-cop/b/kfAccount/v1/syncKfAccountList`, p)

// 同步客服账号到企微
export const syncKfAccountToWxCp = p => post(`/service-cop/b/kfAccount/v1/syncKfAccountToWxCp/${p.id}`, p)

// 从企业微信同步客服接待消息列表
export const syncKfFriendsMessageFromWxcp = p => post(`/service-cop/b/kfAccount/v1/syncKfFriendsMessageFromWxcp`, p)
// 查询客服接待消息分页列表
export const getKfFriendsMessagePageList = p => post(`/service-cop/b/kfAccount/v1/friendsMessagePageList`, p)
